<html>
<head><meta charset="utf-8"><title>target/target feature CI · project-portable-simd · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/index.html">project-portable-simd</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html">target/target feature CI</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212502777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212502777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212502777">(Oct 07 2020 at 00:27)</a>:</h4>
<p>The <code>-C target_feature</code> usage in the .travis.yml seems... confused? For example: I think these two are the same: <a href="https://github.com/rust-lang/stdsimd/blob/0b39351ba5b42becb7bc9b53adb8e95f9490cbdf/.travis.yml#L74-L85">https://github.com/rust-lang/stdsimd/blob/0b39351ba5b42becb7bc9b53adb8e95f9490cbdf/.travis.yml#L74-L85</a>. E.g. one of them probably should be <code>TARGET_FEATURE=-neon</code> (this would require other changes to the script to handle the <code>-</code> but not the point).</p>
<p>The target/feature coverage misses a lot of cases I'd be worried about, although I'm kind of impressed that travis has ppc/aarc64 runners. That said, for weirder stuff we'll want to use <code>cross</code> I think?</p>
<p>If there's interest, it would be pretty easy for me to set up some github actions to test more targets with <code>cross</code>. This would be in addition to travis, and I would avoid doing it for anything that is already covered. So, would a patch for this be accepted?</p>
<p>(I'm offering to do it for GHA instead of offering to extend the travis config with it... mostly just b/c it would take me way less time, since I've used it way more.... But, also Travis's website sometimes just takes me to a blank page that tells me that it failed to parse some JSON... and refuses to let me do anything until I've cleared its cookies)</p>



<a name="212503250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212503250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212503250">(Oct 07 2020 at 00:35)</a>:</h4>
<p>other issues:</p>
<ul>
<li>these three are also equivalent: <a href="https://github.com/rust-lang/stdsimd/blob/0b39351ba5b42becb7bc9b53adb8e95f9490cbdf/.travis.yml#L10-L28">https://github.com/rust-lang/stdsimd/blob/0b39351ba5b42becb7bc9b53adb8e95f9490cbdf/.travis.yml#L10-L28</a>.</li>
<li>SSSE3 should probably be in the mix too. note that x86_64-apple-darwin (a tier 1 target) is <code>+sse,+sse2,+sse3,+ssse3</code>, and it's where we'll find the useful stuff like integer abs.</li>
</ul>
<p>related: if you turn on, say <code>target_feature=+sse3</code>, does that automatically turn on the "lower" features? (it seems to, but this is slightly surprising)</p>



<a name="212504015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212504015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212504015">(Oct 07 2020 at 00:51)</a>:</h4>
<p>Yes, additional CI setups are deeply desired.</p>



<a name="212504084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212504084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212504084">(Oct 07 2020 at 00:53)</a>:</h4>
<p>Also, i think the story with "related" features is that some features imply others within rust in a documented way, and some features imply others within llvm as well in a way that rust doesn't quite document (but which isn't hard to figure out).</p>



<a name="212504163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212504163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212504163">(Oct 07 2020 at 00:54)</a>:</h4>
<p>yeah, i'm basically just looking at how <code>rustc --print=cfg --target=i586-unknown-linux-gnu -Ctarget-feature=&lt;thing here&gt;</code> changes stuff lol. i think someone (<span class="user-mention" data-user-id="281757">@Jubilee</span> ?) mentioned the existence of a avx512 chip that... somehow didn't have some of the lower sse sets? this truly horrifies me if so</p>



<a name="212506608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212506608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212506608">(Oct 07 2020 at 01:41)</a>:</h4>
<p>Yes, this is the Xeon Phi ("Knight's") series of chips: <a href="https://en.wikipedia.org/wiki/Xeon_Phi">https://en.wikipedia.org/wiki/Xeon_Phi</a><br>
they're only really used in supercomputing so  we can mostly shrug them off. I wouldn't be excited if we were busted for them but "Well, Rust doesn't work on some very niche non-commodity hardware" is not exactly the most damning thing to say. :P</p>



<a name="212506723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212506723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212506723">(Oct 07 2020 at 01:43)</a>:</h4>
<p>Still, they're a good example of how featuresets are... truly arbitrary, rather than building in a necessarily layered way, which is the real thing. We can't just dispatch hierarchically.<br>
I believe <span class="user-mention" data-user-id="312331">@Caleb Zulawski</span> first found the Xeon Phi stuff.</p>



<a name="212506928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212506928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212506928">(Oct 07 2020 at 01:47)</a>:</h4>
<p>thanks, that's extremely cursed. i very much hope that after this intel forgets that they can just set random bits inside the cpuid result</p>



<a name="212507043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212507043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212507043">(Oct 07 2020 at 01:49)</a>:</h4>
<p>... honestly i wonder if "buy old xeon phi on ebay" is the cheapest way to run avx512 code</p>



<a name="212507137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212507137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212507137">(Oct 07 2020 at 01:51)</a>:</h4>
<p>Actually, intel makes a NUC with a very slow i5 that for some reason has AVX512, that's probably the cheapest way</p>



<a name="212507156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212507156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212507156">(Oct 07 2020 at 01:51)</a>:</h4>
<blockquote>
<p>Knights Landing contains up to 72 Airmont (Atom) cores with four threads per core,[75][76] using LGA 3647 socket[77] supporting up to 384 GB of "far" DDR4 2133 RAM and 8–16 GB of stacked "near" 3D MCDRAM, a version of the Hybrid Memory Cube. Each core has two 512-bit vector units and supports AVX-512 SIMD instructions, specifically the Intel AVX-512 Foundational Instructions (AVX-512F) with Intel AVX-512 Conflict Detection Instructions (AVX-512CD), Intel AVX-512 Exponential and Reciprocal Instructions (AVX-512ER), and Intel AVX-512 Prefetch Instructions (AVX-512PF). Support for IMCI has been removed in favor of AVX-512.[78]</p>
</blockquote>



<a name="212507228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212507228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212507228">(Oct 07 2020 at 01:52)</a>:</h4>
<p>make sure it's Knight's Landing or later.</p>



<a name="212508832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212508832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212508832">(Oct 07 2020 at 02:23)</a>:</h4>
<p>Well in 2 weeks of portable simd I've seen the highest density of cursed content in a while.</p>



<a name="212510538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212510538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212510538">(Oct 07 2020 at 03:00)</a>:</h4>
<p>If we're looking for PowerPC CI, you can get it for free for open source projects here: <a href="https://osuosl.org/services/powerdev/">https://osuosl.org/services/powerdev/</a></p>



<a name="212583171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212583171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212583171">(Oct 07 2020 at 16:19)</a>:</h4>
<p><a href="https://github.com/rust-lang/stdsimd/pull/30">https://github.com/rust-lang/stdsimd/pull/30</a></p>
<p>as always with ci changes, this was built on a foundation of blood, sweat, and terrible commit messages</p>
<p><a href="/user_uploads/4715/yWiD3hPjvsCNclCXgqTEl99R/Screen-Shot-2020-10-07-at-7.03.29-AM.png">Screen-Shot-2020-10-07-at-7.03.29-AM.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/yWiD3hPjvsCNclCXgqTEl99R/Screen-Shot-2020-10-07-at-7.03.29-AM.png" title="Screen-Shot-2020-10-07-at-7.03.29-AM.png"><img src="/user_uploads/4715/yWiD3hPjvsCNclCXgqTEl99R/Screen-Shot-2020-10-07-at-7.03.29-AM.png"></a></div>



<a name="212596739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212596739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212596739">(Oct 07 2020 at 18:05)</a>:</h4>
<p>mood</p>



<a name="212735491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212735491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212735491">(Oct 08 2020 at 19:05)</a>:</h4>
<p>So that landed. I'm probably going to try to move some of this to a docker+qemu setup in a bit (more or less the way <code>stdarch</code> does it, although almost certainly with a different set of targets) since we'd like to be able to run stuff in qemu with specific target features enabled or disabled (among other things), and on targets cross doesn't have docker images for (cross lets you use custom docker images but it's kind of limited still).</p>



<a name="212737858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212737858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212737858">(Oct 08 2020 at 19:25)</a>:</h4>
<p>I want to run on the actual metal for as many targets as possible, but I agree that docker + qemu stuff is great for everything else.</p>



<a name="212737963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212737963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212737963">(Oct 08 2020 at 19:26)</a>:</h4>
<p>and even when we have access to the metal, dockerized qemu can help with lots, like dev envs and uh, verifying the dev envs are accurately virtualizing <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="212740898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212740898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212740898">(Oct 08 2020 at 19:51)</a>:</h4>
<blockquote>
<p>I want to run on the actual metal for as many targets as possible</p>
</blockquote>
<p>yeah definitely, i'm not getting rid of running on the actual targets everywhere possible.</p>



<a name="212741258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212741258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212741258">(Oct 08 2020 at 19:54)</a>:</h4>
<p>i'm not super familiar with docker (familiar enough that setting this up sounds feasible, but not substantially more familiar lol) so i'll take your word for the other points, but another benefit of qemu over metal in some cases is that if you execute an instruction that requires a target feature you shouldn't have access to, it will always fail instead of depending on what the test runner happens to have.</p>



<a name="212741354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212741354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212741354">(Oct 08 2020 at 19:55)</a>:</h4>
<p>but also qemu can have bugs so theres absolutely no substitute for running on hardware IMO</p>



<a name="212741504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212741504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212741504">(Oct 08 2020 at 19:57)</a>:</h4>
<p>yeah, the packed_simd qemu targets just<br>
fail randomly tbqh</p>



<a name="212742473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212742473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212742473">(Oct 08 2020 at 20:05)</a>:</h4>
<p>the ones that fail hardest and most often are the ARM virtualizations (from x86_64 runners?).</p>



<a name="212742579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212742579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212742579">(Oct 08 2020 at 20:06)</a>:</h4>
<p>but maybe I just notice it more in those cases because it has a lot of those.</p>



<a name="212783601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/target/target%20feature%20CI/near/212783601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI.html#212783601">(Oct 09 2020 at 04:54)</a>:</h4>
<p><span class="user-mention silent" data-user-id="209168">Thom Chiovoloni</span> <a href="#narrow/stream/257879-project-portable-simd/topic/target.2Ftarget.20feature.20CI/near/212741354">said</a>:</p>
<blockquote>
<p>but also qemu can have bugs so theres absolutely no substitute for running on hardware IMO</p>
</blockquote>
<p>That's for sure, I've encountered a pile of them myself when trying to verify Libre-SOC's processor matches POWER9.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>